module airline_ticket;

AirlineTicket::AirlineTicket()
	:m_passengerName{ "Unknown Passenger" },
	m_numberOfMiles{ 0 },
	m_hasEliteSuperRewardsStatus{ false }
{
}

AirlineTicket::AirlineTicket(const std::string &name, int miles, bool status)
	:m_passengerName{ name },
	m_numberOfMiles{ miles },
	m_hasEliteSuperRewardsStatus{ status }
{
}

AirlineTicket::~AirlineTicket()
{
}

void AirlineTicket::setPassengerName(const std::string &name)
{
	m_passengerName = name;
}

std::string AirlineTicket::getPassengerName() const
{
	return m_passengerName;
}

void AirlineTicket::setNumberOfMiles(int numberOfMiles)
{
	m_numberOfMiles = numberOfMiles;
}

int AirlineTicket::getNumberOfMiles() const
{
	return m_numberOfMiles;
}

void AirlineTicket::setEliteSuperRewardsStatus(bool hasEliteSuperRewardsStatus)
{
	m_hasEliteSuperRewardsStatus = hasEliteSuperRewardsStatus;
}

bool AirlineTicket::hasEliteSuperRewardsStatus() const
{
	return m_hasEliteSuperRewardsStatus;
}

double AirlineTicket::calculatePriceInDollars() const
{
	if (hasEliteSuperRewardsStatus() == true)
	{
		return 0.0;
	}

	return getNumberOfMiles() * 0.1;
}

